home *** CD-ROM | disk | FTP | other *** search
/ Freelog 117 / FreelogNo117-OctobreNovembre2013.iso / Programmation / jedit / jedit5.1.0install.exe / {app} / modes / shellscript.xml < prev    next >
Extensible Markup Language  |  2013-07-28  |  5KB  |  177 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!DOCTYPE MODE SYSTEM "xmode.dtd">
  4.  
  5. <MODE>
  6.     <PROPS>
  7.         <PROPERTY NAME="lineComment" VALUE="#" />
  8.         <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
  9.         <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
  10.         <PROPERTY NAME="indentNextLines"
  11.             VALUE="^.*(then|do|else|case.*in)\s*(#.*)?$" />
  12.         <PROPERTY NAME="unindentThisLine"
  13.             VALUE="^\s*(fi|else|done|esac|[^(]*\).*)\s*(#.*)?$" />
  14.         <PROPERTY NAME="unindentNextLines"
  15.             VALUE="^\s*(fi|else|done|esac)\s*(#.*)?$" />
  16.         <!-- 3 possible values for electricKeys may be considered
  17.           1. electric enter and the bracket: ") "
  18.           2. letters ending unindent rules ")iec"
  19.           3. all letters ")abcdefghijklmnopqrstuvwxyz"
  20.           details: http://jedit.9.n6.nabble.com/jEdit-devel-electric-keys-for-shell-mode-tp4998749.html
  21.         -->
  22.         <PROPERTY NAME="electricKeys" VALUE=")abcdefghijklmnopqrstuvwxyz" />
  23.     </PROPS>
  24.     <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="TRUE">
  25.         <!-- Comments -->
  26.         <EOL_SPAN TYPE="COMMENT2">#!</EOL_SPAN>
  27.         <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
  28.  
  29.         <!-- BUG #3594428 (Bash Syntax Highlighting) -->
  30.         <SPAN TYPE="KEYWORD2" DELEGATE="LITERAL" NO_LINE_BREAK="TRUE">
  31.             <BEGIN>${</BEGIN>
  32.             <END>}</END>
  33.         </SPAN>
  34.  
  35.         <MARK_FOLLOWING TYPE="KEYWORD2">$#</MARK_FOLLOWING>
  36.         <MARK_FOLLOWING TYPE="KEYWORD2">$?</MARK_FOLLOWING>
  37.         <MARK_FOLLOWING TYPE="KEYWORD2">$*</MARK_FOLLOWING>
  38.         <MARK_FOLLOWING TYPE="KEYWORD2">$@</MARK_FOLLOWING>
  39.         <MARK_FOLLOWING TYPE="KEYWORD2">$$</MARK_FOLLOWING>
  40.         <MARK_FOLLOWING TYPE="KEYWORD2">$<</MARK_FOLLOWING>
  41.         <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
  42.         <MARK_PREVIOUS TYPE="KEYWORD2" MATCH_TYPE="OPERATOR">=</MARK_PREVIOUS>
  43.  
  44.         <!-- weird stuff -->
  45.         <SPAN TYPE="KEYWORD3" DELEGATE="EXEC" ESCAPE="\">
  46.             <BEGIN>$((</BEGIN>
  47.             <END>))</END>
  48.         </SPAN>
  49.         <SPAN TYPE="KEYWORD3" DELEGATE="EXEC" ESCAPE="\">
  50.             <BEGIN>$(</BEGIN>
  51.             <END>)</END>
  52.         </SPAN>
  53.         <SPAN TYPE="KEYWORD3" DELEGATE="EXEC" ESCAPE="\">
  54.             <BEGIN>$[</BEGIN>
  55.             <END>]</END>
  56.         </SPAN>
  57.         <SPAN TYPE="KEYWORD3" DELEGATE="EXEC" ESCAPE="\">
  58.             <BEGIN>`</BEGIN>
  59.             <END>`</END>
  60.         </SPAN>
  61.  
  62.         <!-- Literals -->
  63.         <SPAN TYPE="LITERAL1" DELEGATE="LITERAL" ESCAPE="\">
  64.             <BEGIN>"</BEGIN>
  65.             <END>"</END>
  66.         </SPAN>
  67.         <SPAN TYPE="LITERAL1">
  68.             <BEGIN>'</BEGIN>
  69.             <END>'</END>
  70.         </SPAN>
  71.  
  72.         <!-- Readins -->
  73.         <SPAN_REGEXP HASH_CHAR="<<" TYPE="LITERAL1" DELEGATE="LITERAL" ESCAPE="\">
  74.             <BEGIN><![CDATA[<<[\p{Space}'"]*([\p{Alnum}_]+)[\p{Space}'"]*]]></BEGIN>
  75.             <END AT_LINE_START="TRUE">$1</END>
  76.         </SPAN_REGEXP>
  77.  
  78.         <!-- Operators -->
  79.         <SEQ TYPE="OPERATOR">|</SEQ>
  80.         <SEQ TYPE="OPERATOR">&</SEQ>
  81.         <SEQ TYPE="OPERATOR">!</SEQ>
  82.         <SEQ TYPE="OPERATOR">></SEQ>
  83.         <SEQ TYPE="OPERATOR"><</SEQ>
  84.  
  85.         <!-- %jobnumber -->
  86.         <MARK_FOLLOWING TYPE="KEYWORD2">%</MARK_FOLLOWING>
  87.  
  88.         <!-- functions -->
  89.         <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
  90.         <SEQ TYPE="OPERATOR">)</SEQ>
  91.  
  92.         <KEYWORDS>
  93.             <KEYWORD1>if</KEYWORD1>
  94.             <KEYWORD1>then</KEYWORD1>
  95.             <KEYWORD1>elif</KEYWORD1>
  96.             <KEYWORD1>else</KEYWORD1>
  97.             <KEYWORD1>fi</KEYWORD1>
  98.             <KEYWORD1>case</KEYWORD1>
  99.             <KEYWORD1>in</KEYWORD1>
  100.             <OPERATOR>;;</OPERATOR>
  101.             <KEYWORD1>esac</KEYWORD1>
  102.             <KEYWORD1>while</KEYWORD1>
  103.             <KEYWORD1>for</KEYWORD1>
  104.             <KEYWORD1>do</KEYWORD1>
  105.             <KEYWORD1>done</KEYWORD1>
  106.             <KEYWORD1>continue</KEYWORD1>
  107.  
  108.             <KEYWORD1>local</KEYWORD1>
  109.             <KEYWORD1>return</KEYWORD1>
  110.         </KEYWORDS>
  111.  
  112.         <!-- some of these should be marked OPERATOR -->
  113.         <!-- <SEQ TYPE="NULL">)</SEQ>
  114.         <SEQ TYPE="NULL">(</SEQ>
  115.         <SEQ TYPE="NULL">=</SEQ>
  116.         <SEQ TYPE="NULL">!</SEQ>
  117.         <SEQ TYPE="NULL">>=</SEQ>
  118.         <SEQ TYPE="NULL"><=</SEQ>
  119.         <SEQ TYPE="NULL">+</SEQ>
  120.         <SEQ TYPE="NULL">-</SEQ>
  121.         <SEQ TYPE="NULL">/</SEQ>
  122.         <SEQ TYPE="NULL">*</SEQ>
  123.         <SEQ TYPE="NULL">^</SEQ>
  124.         <SEQ TYPE="NULL">~</SEQ>
  125.         <SEQ TYPE="NULL">}</SEQ>
  126.         <SEQ TYPE="NULL">{</SEQ>
  127.         SEQ TYPE="NULL">.</SEQ
  128.         <SEQ TYPE="NULL">,</SEQ>
  129.         <SEQ TYPE="NULL">;</SEQ>
  130.         <SEQ TYPE="NULL">]</SEQ>
  131.         <SEQ TYPE="NULL">[</SEQ>
  132.         <SEQ TYPE="NULL">?</SEQ>
  133.         <SEQ TYPE="NULL">:</SEQ> -->
  134.     </RULES>
  135.  
  136.     <RULES SET="LITERAL" DEFAULT="LITERAL1" ESCAPE="\">
  137.         <!-- Variables -->
  138.         <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
  139.             <BEGIN>${</BEGIN>
  140.             <END>}</END>
  141.         </SPAN>
  142.  
  143.         <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
  144.     </RULES>
  145.  
  146.     <RULES SET="EXEC" DEFAULT="KEYWORD3" ESCAPE="\">
  147.         <!-- Variables -->
  148.         <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
  149.             <BEGIN>${</BEGIN>
  150.             <END>}</END>
  151.         </SPAN>
  152.  
  153.         <SPAN TYPE="KEYWORD3">
  154.             <BEGIN>$((</BEGIN>
  155.             <END>))</END>
  156.         </SPAN>
  157.  
  158.         <SPAN TYPE="KEYWORD3">
  159.             <BEGIN>$(</BEGIN>
  160.             <END>)</END>
  161.         </SPAN>
  162.  
  163.         <SPAN TYPE="KEYWORD3">
  164.             <BEGIN>$[</BEGIN>
  165.             <END>]</END>
  166.         </SPAN>
  167.  
  168.         <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
  169.  
  170.         <SEQ TYPE="OPERATOR">|</SEQ>
  171.         <SEQ TYPE="OPERATOR">&</SEQ>
  172.         <SEQ TYPE="OPERATOR">!</SEQ>
  173.         <SEQ TYPE="OPERATOR">></SEQ>
  174.         <SEQ TYPE="OPERATOR"><</SEQ>
  175.     </RULES>
  176. </MODE>
  177.